import { http } from '@/utils/http'
import { post } from '@/utils/http'

/**
 * 资产-违章-详情
 */
export const getViolationDetail = (y: { id: any }) => {
  return http({
    method: 'POST',
    url: '/V5/violation/detail',
    data: y,
  })
}

/**
 * 资产-违章-新增
 */
export const createViolation = (y: { id: any }) => {
  return http({
    method: 'POST',
    url: '/V5/violation/create',
    data: y,
  })
}

/**
 * 资产-违章-编辑
 */
export const editViolation = (y: { id: any }) => {
  return http({
    method: 'POST',
    url: '/V5/violation/update',
    data: y,
  })
}

/**
 * 资产-违章-查看催缴记录
 */
export const checkCallRecord = (y: { id: any }) => {
  return http({
    method: 'POST',
    url: '/V5/violation/urge/list',
    data: y,
  })
}

/**
 * 资产-违章-催缴保存
 */
export const saveCall = (y: { id: any }) => {
  return http({
    method: 'POST',
    url: '/V5/violation/urge/edit',
    data: y,
  })
}

// 查找车辆在指定时间履行的订单
export const findOrder = (data: any) => {
  return http({
    method: 'POST',
    url: '/V5/carInfo/findOrder',
    data,
  })
}

// 查找车辆在指定时间履行的订单
export const getLinkedOrder = (data: any) => {
  return http({
    method: 'POST',
    url: '/V5/carInfo/findOrderInTime',
    data,
  })
}

// 违章处理付款状态统计
export const removeBatchTempUse = (data: any) => post({ url: '/V5/violation/handleCount', data })

// 行驶证记录保存
export const updateDriveLicenseRecord = (data: any) => post({ url: '/V5/violation/driveLicenseRecord', data })

// 状态统计
export const getViolationStatusCount = (data: any) => post({ url: '/V5/violation/statusCount', data })

// 违章处理付款状态统计
export const getViolationHandleCount = (data: any) => post({ url: '/V5/violation/handleCount', data })

// 添加违章标签
export const addViolationTag = (data: any) => post({ url: '/V5/violation/label/add', data })

// 删除违章
export const deleteViolation = (data: any) => post({ url: '/V5/violation/delete', data })
